/**
 * @file   GetClientPropertyInfoResponsePacket.h
 * @author Djuro Drljaca (djurodrljaca@gmail.com)
 * @date   2013-05-16
 * @brief  DataBus Get Client Property Info Response packet.
 *
 * Copyright (C) 2013  Djuro Drljaca <djurodrljaca@gmail.com>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 *
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef LIBDATABUS_COMMON_GETCLIENTPROPERTYINFORESPONSEPACKET_H
#define LIBDATABUS_COMMON_GETCLIENTPROPERTYINFORESPONSEPACKET_H

#include <DataBus/Common/Packet.h>
#include <DataBus/Common/PropertyInfo.h>

namespace DataBus
{
namespace GetClientPropertyInfoResponsePacket
{
/**
 * @brief Create GetClientPropertyInfoResponse packet
 *
 * @param source        Source Client ID
 * @param destination   Destination Client ID
 * @param packetId      Packet ID
 * @param propertyInfo  Property Info
 *
 * @param[out] packet   DataBus Packet
 *
 * @retval true     Success
 * @retval false    Error
 */
DATABUSSHARED_EXPORT bool create(const quint8 source,
                                 const quint8 destination,
                                 const quint8 packetId,
                                 const PropertyInfo &propertyInfo,
                                 Packet *packet);

/**
 * @brief Parse Packet
 *
 * @param packet            DataBus Packet
 *
 * @param[out] propertyInfo Property Info
 *
 * @retval true     Success
 * @retval false    Failed
 */
DATABUSSHARED_EXPORT bool parse(const Packet &packet,
                                PropertyInfo *propertyInfo);
}
}

#endif // LIBDATABUS_COMMON_GETCLIENTPROPERTYINFORESPONSEPACKET_H
